<?php
include_once('./base/xcx_sqlclass.php');
include_once('./base/xcx_commonclass.php');
$fun=new commonfun();
$mysql=new MMsql();
$userid=$_POST['userid'];
$isable=1;
$sql="select wk_id from wk_students where user_id='".$userid."' and isable='".$isable."' order by Id desc";
$result=$mysql->doSql($sql);
$list=[];
if(count($result)>0){
	foreach($result as $item){
		$sql="select * from wk_classinfo where wk_id='".$item['wk_id']."' ";
		$result=$mysql->doSql($sql);
		if(count($result)>0){
			$list[]=$result[0];
		}
	}
	
}
echo json_encode($list);